{% extends 'ZaysoAreaBundle:Layout:layout.html.twig' %}

{% block title %}Area - Openid{% endblock %}

{% block content %}
<div>
    <h1>Sign In Using Social Network</h3>
    <p>You have sucessfully picked the following social network:</p>
    <table border="1">
        <tr><td>Social Network</td><td>Your Display Name</td></tr>
        <tr><td>{{ form.vars.value.openidProvider }}</td><td>{{ form.vars.value.openidDisplayName }}</td></tr>
    </table>
    <p>
        This social network account is not currently connected to your zayso account.  
        This is normal for new accounts or if it the first time you are visiting 
        this site in 2012.  
        However, if you have already connected a social network site to your zayso account then something is wrong.
        You probably picked the wrong social network.  
        Return the the <a href="{{ path('zayso_area_welcome') }}">Welcome Page</a> and pick a different network.
    </p>
    <p>
        If you have created an account on the National Games site then enter your National Games user name and password
        into the form below.  The same account will be used for local games as well as the National Games.
    <p>
        If you have an existing zayso account then enter your old zayso account name and password into the form below.
        This will tie the social network to your zayso account and sign you in.
    </p>
    <p>
        If you are a brand new user and wish to create a new zayso account then proceed to: <br />
        <a href="{{ path('zayso_area_account_create') }}">Create a New Account</a>.
    </p>

{% form_theme form 'ZaysoAreaBundle:Form:fields.html.twig' %}

<form action="{{ path('zayso_area_account_legacy_signin') }}" method="post" {{ form_enctype(form) }}>
<table border="1" style="width: 600px;">
<tr><th colspan="3">Sign in to existing zayso account</th></tr>
<tr>
  <td style="width: 250px;">{{ form_label (form.openidProvider) }}</td>
  <td style="width: 200px;">{{ form_widget(form.openidProvider) }}</td>
  <td style="width: 200px;">{{ form_errors(form.openidProvider) }}</td>
</tr>
<tr>
  <td style="width: 100px;">{{ form_label (form.openidDisplayName) }}</td>
  <td style="width: 200px;">{{ form_widget(form.openidDisplayName) }}</td>
  <td style="width: 300px;">{{ form_errors(form.openidDisplayName) }}</td>
</tr>
<tr><td colspan="3"></td></tr>
<tr>
  <td style="width: 100px;">{{ form_label (form.userName) }}</td>
  <td style="width: 200px;">{{ form_widget(form.userName) }}</td>
  <td style="width: 300px;">{{ form_errors(form.userName) }}</td>
</tr>
<tr>
  <td style="width: 100px;">{{ form_label (form.userPass) }}</td>
  <td style="width: 200px;">{{ form_widget(form.userPass) }}</td>
  <td style="width: 300px;">{{ form_errors(form.userPass) }}</td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td align="center"><input type="submit" name="accountSigninSubmit" value="Sign In" />
  <td>&nbsp;</td>
</tr>
<tr><td colspan="3">{{ form_errors(form) }}</td></tr>
</table>
{{ form_rest(form) }}
</form>
</div>
{% endblock %}
